home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 37 / CD Expert nº 37.iso / LastCall / lastcall.exe / stuff / pour.dxr / 00006_Close me.ls < prev    next >
Encoding:
Text File  |  2000-03-23  |  1.3 KB  |  61 lines

  1. on mouseDown me
  2.   global gPauseState
  3.   if the optionDown then
  4.     sendSprite(7, #mUpdate, 0.75)
  5.     sendSprite(6, #mUpdate, 6)
  6.     exit
  7.   else
  8.     if the shiftDown then
  9.       sendSprite(7, #mUpdate, 0.5)
  10.       sendSprite(6, #mUpdate, 9)
  11.       exit
  12.     else
  13.       if the commandDown then
  14.         sendSprite(7, #mUpdate, 0.75)
  15.         sendSprite(6, #mUpdate, 3)
  16.         exit
  17.       else
  18.         if the controlDown then
  19.           sendSprite(7, #mUpdate, 0)
  20.           sendSprite(6, #mUpdate, 6)
  21.           exit
  22.         end if
  23.       end if
  24.     end if
  25.   end if
  26.   if gPauseState then
  27.     beep()
  28.     exit
  29.   end if
  30.   dragWindow()
  31.   refreshDrinkContents(VOID, VOID)
  32. end
  33.  
  34. on mouseUp me
  35.   if the doubleClick then
  36.     closePourWindow()
  37.   end if
  38. end
  39.  
  40. on dragWindow
  41.   startH = (the clickLoc)[1]
  42.   startV = (the clickLoc)[2]
  43.   whichWindow = the activeWindow
  44.   startRect = whichWindow.rect
  45.   repeat while the stillDown
  46.     updateStage()
  47.     newRect = offset(startRect, the mouseH - startH, the mouseV - startV)
  48.     if the activeWindow <> the stage then
  49.       tell the stage
  50.         checkElapsedTime()
  51.         move_dummy(whichWindow, newRect)
  52.       end tell
  53.     end if
  54.   end repeat
  55.   if whichWindow <> the stage then
  56.     tell the stage
  57.       drop_window(whichWindow, newRect)
  58.     end tell
  59.   end if
  60. end
  61.